// pages/report/reportTypeList/reportTypeList.js
const app=getApp()

Page({
  /**
   * 页面的初始数据
   */
  data: {
    navbarData: {
      showCapsule: 1, //是否显示左上角图标   1表示显示    0表示不显示
      title: '康复周期', //导航栏 中间的标题
    },
    navHeight: app.globalData.statusBarHeight * 2 + 86,
    deptId: app.globalData.deptId,
    userId:'',
    templateContent:[]
  },
  onShow() {
     
    this.setData({
      deptId: app.globalData.deptId
    })
    this.zhouList()
  },

 

  zhouList(){
    let { userId } = app.globalData;
    // let that = this
      wx.request({
        url: app.getTableUrl('/nirn/web/scale/treatSymptomData/list'),
        method: 'GET',
        data: {
          patientId:userId
          
        },
        success:(res)=> {
          console.log(res.data.data);
          this.setData({
            templateContent: res.data.data
          })
          // if(data){
          //   data.forEach(item=>{
          //     console.log(item.templateContent.papers.templateName);
          //   })
          // }
        }

      })
  },


  toGrowthRecord(row){
    // console.log(row);
    let temp = JSON.stringify(row.currentTarget.dataset.temp)
    wx.navigateTo({
      url: '../cyclelist/cyclelist?temp='+ temp,
    })
  }

 
})